package com.xuelang.pipeline.app.resource.converter;

import com.xuelang.pipeline.client.resource.dto.DictDTO;
import com.xuelang.pipeline.domain.resource.Dict;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 字典DTO与字典实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface DictDTOToDictConverter {
    DictDTOToDictConverter INSTANCE = Mappers.getMapper(DictDTOToDictConverter.class);

    /**
     * Dict转化为DictDTO
     * @param dict
     * @return
     */
    DictDTO dictToDictDTO(Dict dict);

    /**
     * DictDTO转化为Dict
     * @param dictDTO
     * @return
     */
    Dict dictDTOToDict(DictDTO dictDTO);
}
